#include <iostream>
using namespace std;

int A[10000011];

int main()
{
    int N;
    long long X;
    cin >> N >> X;

    for (int i = 1; i <= N; i++)
        scanf("%d", &A[i]);

    int l, r;
    l = r = 1;
    long long sum = A[1];
    int minl = 0, minr = N;

    while (r <= N)
    {
        if (sum < X)
            sum += A[++r]; // 扩大区间
        else
        {
            if (minr - minl > r - l) // 更新最小区间
            {
                minr = r;
                minl = l;
            }
            sum -= A[l++]; // 缩小窗口
        }
    }

    cout << minl << " " << minr << endl;
    return 0;
}
